FreeCameraOptions

class FreeCameraOptions

Various options for accessing physical properties of the underlying camera entity. A direct access to these properties allows more flexible and precise controlling of the camera while also being fully compatible and interchangeable with CameraOptions. All fields are optional.

Functions

getOrientation
Link copied to clipboard
open fun getOrientation(): Vec4
Get the orientation of the camera represented as a unit quaternion [x, y, z, w].
getPosition
Link copied to clipboard
open fun getPosition(): Vec3
Get the position of the camera in slightly modified web mercator coordinates- The size of 1 unit is the width of the projected world instead of the "mercator meter".Coordinate [0, 0, 0] is the north-west corner and [1, 1, 0] is the south-east corner.- Z coordinate is conformal and must respect minimum and maximum zoom values.
lookAtPoint
Link copied to clipboard
open fun lookAtPoint(@NonNull() location: Point)
Helper function for setting orientation of the camera by defining a focus point.Elevation of 0.0 is used and no up vector.
open fun lookAtPoint(@NonNull() location: Point, altitude: Double)
Helper function for setting orientation of the camera by defining a focus point.No up vector is used.
open fun lookAtPoint(@NonNull() location: Point, altitude: Double, @NonNull() upVector: Vec3)
Helper function for setting orientation of the camera by defining a focus point.Up vector is required in certain scenarios where bearing can't be deduced fromthe viewing direction.
setLocation
Link copied to clipboard
open fun setLocation(@NonNull() location: Point, altitude: Double)
Helper function for setting the mercator position as Lat&Lng and altitude in meters
setOrientation
Link copied to clipboard
open fun setOrientation(@Nullable() orientation: Vec4)
Set the orientation of the camera represented as a unit quaternion [x, y, z, w].The default pose of the camera is such that the forward vector is looking up the -Z axis andthe up vector is aligned with north orientation of the map:forward: [0, 0, -1]up: [0, -1, 0]right [1, 0, 0]With the w value as the real part of the complex numberOrientation can be set freely but certain constraints still apply- Orientation must be representable with only pitch and bearing.
setPitchBearing
Link copied to clipboard
open fun setPitchBearing(pitch: Double, bearing: Double)
Helper function for setting the orientation of the camera as a pitch and a bearing.
setPosition
Link copied to clipboard
open fun setPosition(@Nullable() position: Vec3)
Set the position of the camera in slightly modified web mercator coordinates- The size of 1 unit is the width of the projected world instead of the "mercator meter".Coordinate [0, 0, 0] is the north-west corner and [1, 1, 0] is the south-east corner.- Z coordinate is conformal and must respect minimum and maximum zoom values.